package web{
	import flash.events.MouseEvent;
	import morn.core.components.Component;
	import morn.core.components.Label;
	import morn.core.components.ScrollBar;
	import morn.core.handlers.Handler;
	import ui.down.WebResultUI;
	/**
	 * 495*428
	 * @author SXL
	 */
	public class TestList extends WebResultUI{
		private static var _instance:TestList;
		public static function get instance():TestList{
            if (!_instance){
                _instance = new TestList();
            }
            return _instance;
        }
		
		/**当前List的滚动条*/
		private var scrollBar:ScrollBar;
		public function start():void{
			App.scene.scene=this;
			this.urlList.dataSource=[
				"1",
				"10",
				"11",
				"12",
				"13",
				"14",
				"15",
				"16",
				"17",
				"18",
				"19",
				"20",
				"21",
				"22",
			];
			this.scrollBar=this.urlList.scrollBar;
			this.urlList.renderHandler=new Handler(this.urlListRender);
			this.addEventListener(MouseEvent.CLICK,this.onClick);
		}
		private function urlListRender(item:Component,index:int):void{
			var tfStatus:Label=item.getChildByName("tfStatus") as Label;
			tfStatus.text=this.urlList.dataSource[index];
		}
		private var tick:int=0;
		private function onClick(evt:MouseEvent):void{
			trace("onClick");
			
			this.scrollBar.value+=this.scrollBar.scrollSize;
		}
	}

}